home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group97a.txt / 000024_icon-group-sender _Thu Jan 23 11:29:16 1997.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 23 Jan 1997 18:16:43 MST
  2. Message-Id: <1.5.4.32.19970123172916.0073d510@post.its.mcw.edu>
  3. X-Sender: cdt@post.its.mcw.edu
  4. X-Mailer: Windows Eudora Light Version 1.5.4 (32)
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset="us-ascii"
  7. Date: Thu, 23 Jan 1997 11:29:16 -0600
  8. To: Junrong Yuan <joan@cs.ucr.edu>, icon-group@cs.arizona.edu
  9. From: Chris Tenaglia <cdt@post.its.mcw.edu>
  10. Subject: Re: Icon Compiling 
  11. Errors-To: icon-group-errors@cs.arizona.edu
  12. Status: RO
  13. Content-Length: 2495
  14.  
  15. This is because 'test' is a unix command that tests for
  16. the existence of a file. There's also a unix command : 'which'
  17. which you can use to see which program you're running.
  18. Try 'which test' or 'which newprogram' to make sure you
  19. aren't selecting the name of an already active program.
  20. I suppose you could also run your test with  ./test
  21. Chris.
  22. At 09:17 PM 1/22/97 -0800, Junrong Yuan wrote:
  23. >Dear Sirs
  24. >
  25. >    I got an interesting problem when trying to compile the following
  26. >short Icon program:
  27. >
  28. >**
  29. >    procedure main()
  30. >      L  :=  [ 1, 2, 3 ];    # Set L to a list of 3 small integers
  31. >      Change_All ( L );      # This procedure does not affect L
  32. >      every write ( ! L );   # Display the values of L
  33. >      Change_One ( L );      # This procedure changes the first element of
  34. >L
  35. >      every write ( ! L );   # Display the values of L
  36. >    end
  37. >    procedure Change_All ( foo )  # This does not affect the caller's
  38. >foo...
  39. >     foo  :=  86;                 # ...because we are not changing...
  40. >    end                           # ...a PART of an aggregate
  41. >    procedure Change_One ( foo )  # This procedure affects the caller's
  42. >foo...
  43. >      foo[1]  :=  99;             # ...because we are changing...
  44. >    end                           # ...a PART of an aggregate
  45. >
  46. >**
  47. >    
  48. >    When I use icnt -x, the program runs correctly and ouput right
  49. >results, as the following:
  50. >--
  51. >1052 > icont test -x
  52. >Translating:
  53. >test.icn:
  54. >  main
  55. >  Change_All
  56. >  Change_One
  57. >No errors
  58. >Linking:
  59. >Executing:
  60. >1
  61. >2
  62. >3
  63. >99
  64. >2
  65. >3
  66. >hill: /home/csgrads/joan/Class/CS181/ICON/learning 
  67. >
  68. >    while if I try the other way around, first compile it and then
  69. >execute, it won't give out any output at all! See the following:
  70. >--
  71. >1053 > test
  72. >hill: /home/csgrads/joan/Class/CS181/ICON/learning 
  73. >
  74. >--
  75. >
  76. >    I am not sure the reason about this. Am I missing something? I am
  77. >looking forward to hearing from you.
  78. >
  79. >    THank you very much!
  80. >
  81. >    Joan
  82. >
  83. >--
  84. >
  85. >Joan Yuan                        |VOICE : (909)787-2953                
  86. >Dept. Of Computer Science        |FAX   : (909)787-4643                
  87. >University Of California         |WWW   : http://www.cs.ucr.edu/~joan/ 
  88. >Riverside, CA 92521-0304         |EMAIL : joan@cs.ucr.edu              
  89. >
  90. >
  91. >
  92. >
  93. >
  94. >
  95. >
  96. >
  97.  
  98. Chris Tenaglia (system manager)         |       cdt@post.its.mcw.edu
  99. Medical College of Wisconsin            |
  100. 8701 W. Watertown Plank Rd.             |      Ce que vous voyez est
  101. Milwaukee, WI 53226 (414)456-8765       |      Ce que vous obtenez !
  102.  
  103.